#  service.py - Service abstraction module
#  Copyright (C) 2005-2007 Sham Chukoury <eleusis@xmms.org>
#
#  This library is free software; you can redistribute it and/or
#  modify it under the terms of the GNU Lesser General Public
#  License as published by the Free Software Foundation; either
#  version 2.1 of the License, or (at your option) any later version.
#
#  This library is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#  Lesser General Public License for more details.

from Chalyx.base import SigProxyObj

class Service(SigProxyObj):
	"""
	The link from Chalyx to the backend service.
	"""
	def playback_start(self):
		"""
		Start playback of current playlist item
		"""
		raise NotImplementedError

	def playback_stop(self):
		"""
		Stop playback of current playlist item
		"""
		raise NotImplementedError

	def playback_pause(self):
		"""
		Pause playback of current playlist item
		"""
		raise NotImplementedError

	def playback_play_pause_toggle(self):
		"""
		Toggle between playing and paused states
		"""
		raise NotImplementedError

	def playback_seek_ms(self):
		"""
		Seek to position (in milliseconds) in stream
		"""
		raise NotImplementedError

	def playback_seek_sec(self):
		"""
		Seek to position (in seconds) in stream
		"""
		raise NotImplementedError

	def playback_get_status(self):
		"""
		Get current playback status
		"""
		raise NotImplementedError

	def playlist_current_pos(self, *args):
		"""
		Get current playlist position. (0 indexed)
		"""
		raise NotImplementedError

	def playlist_play_pos(self):
		"""
		Play item at position in playlist
		"""
		raise NotImplementedError

	def playlist_add(self):
		"""
		Add a URL to the playlist (adds to end of list)
		"""
		raise NotImplementedError

	def playlist_add_multiple(self):
		"""
		Add multiple URLs to the playlist
		"""
		raise NotImplementedError

	def playlist_add_from_library(self):
		"""
		Add a playlist item from the library
		"""
		raise NotImplementedError

	def playlist_remove(self):
		"""
		Remove a playlist item at a specified position
		"""
		raise NotImplementedError

	def playlist_remove_multiple(self):
		"""
		Remove playlist items from multiple specified positions
		"""
		raise NotImplementedError

	def playlist_remove_id(self):
		"""
		Remove playlist items matching a specific ID (NOT position)
		"""
		raise NotImplementedError

	def playlist_save(self):
		"""
		Save the current playlist to a file
		"""
		raise NotImplementedError

	def playlist_load(self):
		"""
		Load a playlist from a file
		"""
		raise NotImplementedError

	def playlist_jump(self, pos):
		"""
		Jump to a specific position in the playlist
		"""
		raise NotImplementedError

	def playlist_jump_lnext(self):
		"""
		Jump to next playlist item in linear order
		"""
		raise NotImplementedError

	def playlist_jump_lprevious(self):
		"""
		Jump to previous playlist item in linear order
		"""
		raise NotImplementedError

	def playlist_set_next(self):
		"""
		Set next playlist item (at absolute position) to be played
		"""
		raise NotImplementedError

	def playlist_set_next_relative(self):
		"""
		Set next playlist item to be played at position relative to
		current position
		"""
		raise NotImplementedError

	def playlist_go_next(self):
		"""
		Go to next playlist item immediately. Used after
		L{service_playlist_set_next} or
		L{service_playlist_set_next_relative}
		"""
		raise NotImplementedError

	def playlist_clear(self):
		"""
		Clear all items from current playlist
		"""
		raise NotImplementedError

	def playlist_insert(self):
		"""
		Insert a URL as a playlist item at a specified position
		"""
		raise NotImplementedError

	def playlist_insert_from_library(self):
		"""
		Insert an item from the library into the playlist at a
		specified position
		"""
		raise NotImplementedError

	def playlist_list_entries(self, *args):
		"""
		Get the list of playlist items. May or may not retrieve
		associated metadata
		"""
		raise NotImplementedError

	def playlist_move(self):
		"""
		Move a playlist item from one position to another
		"""
		raise NotImplementedError

	def playlist_swap(self):
		"""
		Swap a playlist item  at a position with a playlist item
		at another position
		"""
		raise NotImplementedError

	def playlist_shuffle(self):
		"""
		Shuffle the current playlist - modifies the playlist
		"""
		raise NotImplementedError

	def playlist_set_random(self):
		"""
		Set the playlist to be played randomly or not - does not
		modify the playlist
		"""
		raise NotImplementedError

	def playlist_set_repeat(self, *args):
		"""
		Set playlist repeat mode
		"""
		raise NotImplementedError

	def playlist_sort(self):
		"""
		Sort the current playlist according to a specified property
		"""
		raise NotImplementedError

	def playlist_diff(self):
		"""
		Show the differences between playlists of different versions
		(MPD only)
		"""
		raise NotImplementedError

	def playlist_delete(self):
		""" should simply be library_delete_playlist?? """
		raise NotImplementedError

	def library_get_info(self):
		"""
		Get info about an item in the media library
		"""
		raise NotImplementedError
	
	def library_find(self, *args):
		"""
		Find items matching certain criteria in the library
		"""
		raise NotImplementedError
	
	def info_current_stream(self):
		"""
		Get info about the current stream selected for playback
		"""
		raise NotImplementedError
	
	def bindata_add(self, *args):
		"""
		Store binary data on backend service.
		"""
		raise NotImplementedError
	
	def bindata_remove(self, *args):
		"""
		Remove stored binary data from backend service.
		"""
		raise NotImplementedError
	
	def bindata_retrieve(self, *args):
		"""
		Fetch stored binary data
		"""
		raise NotImplementedError
